//
//  BURequestManager.m
//  BUBU3D
//
//  Created by lichentao on 14-7-10.
//  Copyright (c) 2014年 chentaoApp. All rights reserved.
//

#import "BURequestManager.h"


@interface BURequestManager(){

}

struct Rect_Test{
    int x;
    int y;
    CGFloat width;
    CGFloat height;
    
    
};

CG_EXTERN const  struct Rect_Test CGRectZero1;

@end

@implementation BURequestManager

+ (BURequestManager *)sharedRequest{
    static  BURequestManager *_obj = nil;
    static dispatch_once_t token;
    dispatch_once(&token,^{
        _obj = [[BURequestManager alloc] init];
        
    });
    return _obj;
}

//// 注册接口
//- (void)requestRegisterWithParamer:(NSDictionary *)parameter
//                           success:(void (^)(UserAccount *userInfo))success
//                           failure:(void (^)(NSString *errorMsg))failure
//{
//    NSString *path = [PATH_BASE stringByAppendingString:USER_REGISTER_API];
//    
//    [self requestPostWithParameterWithBlockDic:path SetParamer:parameter success:^(NSDictionary *responseDic){
//        [[UserAccount instance] restoreAccount:responseDic];
//        [[UserAccount instance] saveAccount];
//        success([UserAccount instance]);
//    } failure:^(NSString *errDic){
//        failure(errDic);
//    }];
//}
//
//// 退出登录
//- (void)requestLoginOutWihtParameter:(NSDictionary *)parameter
//    success:(void (^)(BOOL isSuccess))success
//    failure:(void (^)(NSString *errorMsg))failure{
//    
//    NSString *path = [PATH_BASE stringByAppendingString:USER_LOGIN_OUT];
//    
//    [self requestPostWithParameterForSuccessOrFailBlock:path SetParamer:parameter success:^(BOOL isSuccess){
//        success(isSuccess);
//    } failure:^(NSString *errMsg){
//        failure(errMsg);
//    }];
//}
//
//// 登录
//- (void)requestLoginWithParamer:(NSDictionary *)parameter
//                        success:(void (^)(UserAccount *userInfo))success
//                        failure:(void (^)(NSString *errorMsg))failure{
//    NSString *path = [PATH_BASE stringByAppendingString:USER_LOGIN_API];
//   
//    [self requestPostWithParameterWithBlockDic:path SetParamer:parameter success:^(NSDictionary *responseDic){
//        [[UserAccount instance] restoreAccount:responseDic];
//        [[UserAccount instance] saveAccount];
//        success([UserAccount instance]);
//        
//    } failure:^(NSString *errDic){
//        failure(errDic);
//    }];
//}
//
//
//// 首页
//- (void)requestMainHomeWithParameterWithBlock:(NSDictionary *)parameter
//                                      success:(void (^)(HomeItem   *homeItem))success
//                                      failure:(void (^)(NSString *errorMsg))failure{
//    NSString *path = [PATH_BASE stringByAppendingString:MAIN_HOME_API];
//
//    [self requestPostWithParameterWithBlockDic:path SetParamer:parameter success:^(NSDictionary *responseDic){
//        HomeItem *homeItem = [[HomeItem alloc] init];
//        [homeItem setHomeItemDictionary:responseDic];
//        success(homeItem);
//        
//    } failure:^(NSString *errDic){
//        failure(errDic);
//    }];
//}
//
//// 新闻详情
//- (void)requestMainHomeDetailWithParameterWithBlock:(NSDictionary *)parameter
//                                      success:(void (^)(NSDictionary   *detailDictionary))success
//                                      failure:(void (^)(NSString *errorMsg))failure{
//    NSString *path = [PATH_BASE stringByAppendingString:MAIN_NEWS_CONTENTS_API];
//    
//    [self requestPostWithParameterWithBlockDic:path SetParamer:parameter success:^(NSDictionary *responseDic){
//        NSLog(@"responseDic %@",responseDic);
//    } failure:^(NSString *errDic){
//        failure(errDic);
//    }];
//}
//
//// 评论列表接口
//- (void)requestCommentListWithParameterWithBlock:(NSDictionary *)parameter
//                                         success:(void (^)(CommentListItem   *commentItem))success
//                                         failure:(void (^)(NSString *errorMsg))failure{
//    NSString *path = [PATH_BASE stringByAppendingString:PROFIT_COMMENT_LIST_API];
//
//    [self requestPostWithParameterWithBlockDic:path SetParamer:parameter success:^(NSDictionary *responseDic){
//        CommentListItem *item = [[CommentListItem alloc] init];
//        [item setCommentListItemDictionary:responseDic];
//        success(item);
//        
//    } failure:^(NSString *errDic){
//        failure(errDic);
//    }];
//}
//
//// 收益列表
//- (void)requestProfitListWithParameterWithBlock:(NSDictionary *)parameter success:(void (^)(ProfitListItem *profitList))success
//                                        failure:(void (^)(NSString *errorMsg))failure{
//    NSString *path = [PATH_BASE stringByAppendingString:MAIN_IN_COME_API];
//    
//    [self requestPostWithParameterWithBlockDic:path SetParamer:parameter success:^(NSDictionary *responseDic){
//        ProfitListItem *item = [[ProfitListItem alloc] init];
//        [item setProfitEntity:responseDic];
//        success(item);
//        
//    } failure:^(NSString *errDic){
//        failure(errDic);
//    }];
//}


@end
